package com.hyk.learning.test.server;

import com.hyk.learning.config.RpcServiceConfig;
import com.hyk.learning.remoting.transport.socket.SocketRpcServer;
import com.hyk.learning.test.helloApi.HelloService;
import com.hyk.learning.test.server.com.hyk.learning.serviceimpl.HelloServiceImpl;

/**
 * @className: SocketServer
 * @author: hyk199710
 * @description: TODO
 * @date: 2024/5/21 23:07
 */
public class SocketServerMain {

    public static void main(String[] args) {
        HelloService helloService = new HelloServiceImpl();
        SocketRpcServer socketRpcServer = new SocketRpcServer();
        RpcServiceConfig rpcServiceConfig = new RpcServiceConfig();
        rpcServiceConfig.setService(helloService);
        socketRpcServer.registerService(rpcServiceConfig);
        socketRpcServer.start();
    }

}
